<template>
	<view class="u-card-box u-m-l-30 u-m-r-30 u-m-t-30 u-font-desc">
		<view class="u-flex u-row-between">
			<view>
				<view class="u-tag-box u-font-24 u-back-blue">{{data.theme.name}}</view>
				<view class="u-tag-box u-font-24 u-back-darkred u-m-l-15" v-if="data.info.is_top == 1">推荐酒局</view>
			</view>
		</view>
		<view class="u-m-t-10 u-font-34 u-font-bold" v-if="data.info.des">
			<span>{{data.info.des}}</span>
		</view>
		<view class="u-m-t-10">
			<span class="u-color-gray">时间：</span>
			<span>{{ data.info.starting_time }}</span>
		</view>
		<view class="u-flex u-row-between u-col-top u-m-t-10">
			<view class="u-flex-1 u-text-line-15">
				<span class="u-color-gray">地点：</span>
				<span>{{ data.info.address }}</span>
			</view>
		</view>
		<view class="u-m-t-10">
			<span class="u-color-gray">费用：</span>
			<!-- <span class="u-color-red">{{ data.info.pay_name }}</span>
			<span class="u-color-red" v-if="data.info.pay_name !== '免费'">/人</span> -->
			<span class="u-color-red">{{data.info.price_two || 0}}元/人</span>
			<span class="u-color-red" v-if="data.info.price_title">（{{data.info.price_title}}）</span>
		</view>
		<!-- <view class="u-m-t-10" v-if="isPromoter">
			<span class="u-color-gray">已收费：</span>
			<span class="u-color-red">{{ data.money }}元</span>
			<span class="u-color-red" v-if="data.info.is_create == 0">（酒局结束后可提现）</span>
			<span class="u-color-red" v-else>
				<span class="u-color-red" v-if="data.price == 0">（已提现）</span>
				<span class="u-color-red" v-else>（手续费为{{data.sign_commission}}%，剩余可提现{{data.price}}元）</span>
			</span>
		</view> -->
		<view class="u-m-t-10 u-font-26" v-if="data.info.deadline_time">{{data.info.deadline_time.slice(0,16)}}前可取消</view>
		<view class="u-m-t-10 u-flex u-flex-wrap" v-if="data.info.label[0]">
			<view class="u-color-green u-m-r-10" v-for="(labelItem,labelIndex) in data.info.label" :key="labelIndex">#{{labelItem}}</view>
		</view>
		<view class="u-flex u-row-between u-m-t-20">
			<view class="u-flex">
				<view class="u-flex u-m-r-10" v-if="data.images_arr && data.images_arr[0]">
					<image v-for="item in data.images_arr" :key="item.id" :src="item.head_img" mode=""
						class="avarar_img"></image>
				</view>
				<view>
					<view v-if="data.info.tea_status == 1">
						<span class="u-color-gray" v-if="data.images_arr[0].head_img">已报名,</span>
						<span class="u-color-red">仅剩{{data.end_num}}个名额</span>
					</view>
					<view class="u-font-bold" v-else-if="data.info.tea_status == 3">已截止</view>
					<view class="u-font-bold" v-else-if="data.info.tea_status == 5">第{{data.info.identifier}}场酒局 已结束</view>
					<view class="u-font-bold" v-else-if="data.info.tea_status == 7">已失效</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ["data","isPromoter"],
		methods: {
			navigationTea() {
				uni.openLocation({
					latitude: parseFloat(this.data.address.latitude),
					longitude: parseFloat(this.data.address.longitude),
					success: (res) => {}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.add_btn {
		background: #2C76ED;
		color: #fff;
		padding: 14rpx 30rpx;
		border-radius: 50rpx;
		font-size: 24rpx;
	}

	.line {
		width: 3rpx;
		height: 50rpx;
		background: #eee;
	}

	.avarar_img {
		width: 52rpx;
		height: 52rpx;
		border-radius: 100%;
		border: 4rpx solid #fff;

		&:not(:first-child) {
			margin-left: -20rpx;
		}
	}

	.complaint_box {
		background-color: #666666;
		border-radius: 8rpx;
		padding: 8rpx 15rpx;
		display: flex;

		.complaint_icon {
			background: #fff;
			color: #666666;
			font-size: 22rpx;
			padding: 0 4rpx;
			background-size: initial;
			border-radius: 6rpx;
		}

		.complaint_text {
			color: #fff;
			font-size: 24rpx;
			margin-left: 10rpx;
		}
	}
</style>